package com.zhb.cloud.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.zhb.cloud.client.fallback.UserClientFallback;
import com.zhb.cloud.utils.ResultVo;

/**
 * @ClassName: UserClient
 * @Description:测试
 * @author: zhb1316783262@163.com
 * @date: 2019年4月17日下午4:37:37
 *
 */
@FeignClient(name = "cloud-center", fallback = UserClientFallback.class)
public interface UserClient {

	@RequestMapping(value = "user/findByUserName", method = RequestMethod.GET)
	ResultVo<?> findByUserName(@RequestParam(name = "userName", required = true) String userName);

	@RequestMapping(value = "user/findByUserNameAndPhone", method = RequestMethod.GET)
	ResultVo<?> findByUserNameAndPhone(
			@RequestParam(name = "userName", required = true)String userName,
			@RequestParam(name = "phone", required = true)String phone);

	@RequestMapping(value = "user/findById", method = RequestMethod.GET)
	ResultVo<?> findById(@RequestParam(name = "id", required = true) int id);

}
